package testProducerAndConsumer;

public class test {
    public static void main(String[] args) {
        Store store=new Store();
        //生产者
        Producer p1=new Producer(store);
        Producer p2=new Producer(store);
        Producer p3=new Producer(store);

        //消费者
        Consumer c1=new Consumer(store);
        Consumer c2=new Consumer(store);
        Consumer c3=new Consumer(store);
        Consumer c4=new Consumer(store);

        //准备线程
        new Thread(p1,"万师傅").start();
        new Thread(p2,"黎师傅").start();
        new Thread(p3,"谢师傅").start();

        new Thread(c1,"小万").start();
        new Thread(c2,"小石").start();
        new Thread(c3,"小谢").start();
        new Thread(c4,"小弟弟").start();
    }

}
